<template>
  <div>
    <router-link v-for="(item, index) in reportList" style="margin-right: 10px" :to="'/report/' + item.id.toString()">{{item.reportName}}</router-link>
  </div>
  <router-view/>
</template>

<script>

import request from "@/utils/request";

export default {
  name: "List",
  created() {
    this.load();
  },
  data() {
    return {
      reportList: []
    }
  },
  methods: {
    load() {
      request.get("http://localhost:8090/report")
      .then((data) => {
        if (data.data.code !== 200) {
          alert(data.data.msg)
        }
        this.reportList = data.data.data
      })
    }
  }
}
</script>

<style scoped>

</style>